<!DOCTYPE html>
<html lang="zxx">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>FoodKa - Food Ordering, Delivery & Restuarent Template</title>

    <!-- Stylesheet -->
    <link rel="stylesheet" href="static/css/animate.min.css">
    <link rel="stylesheet" href="static/css/bootstrap.min.css">
    <link rel="stylesheet" href="static/css/magnific.min.css">
    <link rel="stylesheet" href="static/css/jquery-ui.min.css">
    <link rel="stylesheet" href="static/css/nice-select.min.css">
    <link rel="stylesheet" href="static/css/owl.min.css">
    <link rel="stylesheet" href="static/css/slick-slide.min.css">
    <link rel="stylesheet" href="static/css/fontawesome.min.css">
    <link rel="stylesheet" href="static/css/remixicon.css">
    <link rel="stylesheet" href="static/css/style.css">
    <link rel="stylesheet" href="static/css/responsive.css">
    <script src="static/js/getParameter.js"></script>
    <!--Google Fonts-->
    <script src="static/js/jquery.3.6.min.js"></script>
    <link href="static/css/css2.css" rel="stylesheet">

    <script>
        $(function (){
            var oid = getParameter("oid");
            load(oid)
        })
        function load(oid){
            $.post("/Pizza_war_exploded/Order/GetOrderByOid",
                {oid:oid},
            function (data){
                $date = $("#date");
                $address = $("#address");
                $details = $("#details");
                $check = $("#check");
                var date = '<i  class="ri-calendar-todo-fill"></i>'+data.date+'';
                var address = '<i  class="ri-price-tag-3-fill"></i>'+data.address+''
                $date.html(date);
                $address.html(address);
                var liList = '';
                for(var i = 0 ; i < data.orderInfo.length ; i++){
                    var fid = ""+data.orderInfo[i].fid;
                    var size = data.orderInfo[i].size;
                    var li = '<div class="col-lg-12">\n' +
                        '                                <div class="single-item-wrap style-2">\n' +
                        '                                    <div class="media">\n' +
                        '                                        <div style="width: 250px;height: 250px" class="thumb">\n' +
                        '                                            <img  src="'+data.orderInfo[i].food.food_img.pic+'" alt="img">\n' +
                        '                                        </div>\n' +
                        '                                        <div class="wrap-details">\n' +
                        '                                            <h5><a href="single-product.html?fid='+data.orderInfo[i].food.fid+'">'+data.orderInfo[i].food.fname+'</a></h5>\n' +
                        '                                            <p style="width: 450px;height: 200px">'+data.orderInfo[i].food.fIntroduce+'</p>\n' +
                        '                                            <div class="wrap-footer">\n' +
                        '                                                <h6 class="price">尺寸 : '+data.orderInfo[i].size+'      </h6>\n'+
                        '<h6>    </h6>'+
                        '                                                <h6 class="price">单价 : $'+data.orderInfo[i].food.price+'</h6>\n' +
                        '                                            </div>\n' +
                        ' <div><a  class="btn btn-secondary w-100" id="eval"  href="javascript:evalMessage('+'\''+oid+'\''+','+'\''+size+'\''+','+'\''+fid+'\''+')" >评价</a></div>'+
                        '                                        </div>\n' +
                        '                                    </div>\n' +
                        '                                </div>\n' +
                        '                            </div>';
                    liList += li;
                }
                $details.html(liList);
                var checkLi =
                        '            <div  class="order-cart-area">\n' +
                       '                <div class="order-cart">\n' +
                       '                    <h5>订单状态</h5>\n' +
                       '                    <h6>总价:$'+data.total_price+'</h6>\n' +
                       '                    <ul>\n' +
                       '                        <li >付款情况 : <span id="PayFlag"></span></li>\n' +
                       '                        <li class="total">收货情况 : <span id="GetFlag"></span></li>\n' +
                       '                    </ul>\n' +
                       '                </div>\n' +
                       '                <div id="btn">\n' +
                       '                </div>\n' +
                       '            </div>\n' +
                       '        </div>';
               $check.html(checkLi);

               $PayFlag = $("#PayFlag");
               $GetFlag = $("#GetFlag");

               $btn = $("#btn");
               $checkPay = $("#checkPay");
               $checkGet = $("#checkGet");
               var Pay = '';
               var Get = '';
               var ChPay = '';
               var ChGet = '';
               var button = '';
                if (data.payFlag=='Y'){
                   Pay = '已付款';
                   $PayFlag.html(Pay);
               }else {
                    Pay = '未付款';
                    ChPay = '<a id="checkPay" class="btn btn-secondary w-100" href="#">点击付款</a>';
                    $PayFlag.html(Pay);
                    button += ChPay;
                }
                if (data.getFlag=='Y'){
                    Get = '已送达';
                    $GetFlag.html(Get);
                }else {
                    Get = '未送达';
                    ChGet = '<a id="checkGet" class="btn btn-base w-100" href="javascript:delivery('+'\''+oid+'\''+')">确认送达</a>';
                    $GetFlag.html(Get);
                    button += ChGet;
                }
                $btn.html(button);
            },"json");
        }
        function delivery(oid) {
            if (confirm("是否确认商品已送达？")) {
                $.post("/Pizza_war_exploded/Order/GetFlagOrder", {oid: oid},
                    function () {

                        location.reload();
                    }, "json");
            }
        }
        function evalMessage(foid,fsize,ffid){
            $.post("/Pizza_war_exploded/Order/ifEval", {oid: foid,fid :ffid,size:fsize},
                function (data) {
                if (data){
                    var mes = prompt("请输入评价 (输入1-5)","");
                    if (mes!=null&&mes!=""){
                        if (mes.match("\^[1-5]\$")){
                            $.post("/Pizza_war_exploded/Order/evalOrder", {oid: foid,fid :ffid,size:fsize,evalMes:mes},
                                function (data) {
                                    alert("评价成功")
                                    location.reload();
                                }, "json");
                        }else{
                            alert("评价格式错误")
                        }
                    }
                }else {
                    $("#eval").html("已评价");
                    $("#eval").attr("href","javascript:void(0)");
                }
                }, "json");
        }

    </script>

</head>
<body class='sc5'>
    <!-- preloader area start -->
    <div class="preloader" id="preloader">
        <div class="preloader-inner">
            <div id="wave1">
            </div>
            <div class="spinner">
                <div class="dot1"></div>
                <div class="dot2"></div>
            </div>
        </div>
    </div>
    <!-- preloader area end -->
    <!-- search popup area start -->
    <div class="body-overlay" id="body-overlay"></div>
    <div class="td-search-popup" id="td-search-popup">

<!--
        <form action="index.html" class="search-form">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Search.....">
            </div>
            <button type="submit" class="submit-btn"><i class="fa fa-search"></i></button>
        </form>
-->
    </div>
    <!-- //. search Popup -->

    <!-- navbar start -->
    <div id="header"></div>
    <!-- navbar end -->

    <!-- bredcrumb Area Start-->
    <section class="breadcrumb-area">
        <div class="banner-bg-img"></div>
        <div class="banner-shape-1"><img src="static/picture/shape-1.png" alt="img"></div>
        <div class="banner-shape-2"><img src="static/picture/shape-2.png" alt="img"></div>
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-lg-6 align-self-center">
                    <div class="banner-inner text-center">
                        <h3>History Order
                        </h3>
                        <h1>Order Details</h1>
                        <nav aria-label="breadcrumb">
                            <ul class="breadcrumb">
                              <li class="breadcrumb-item"><a href="javascript:;">Home</a></li>
                              <li class="breadcrumb-item"><a href="blog.html">History Order</a></li>
                              <li class="breadcrumb-item active" aria-current="page">Order Details</li>
                            </ul>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- bredcrumb Area End --> 

    <!-- blog single start -->
    <div class="blog-single-area pd-top-120 pd-bottom-90">
        <div class="container">
            <div class="row">
                <div class="col-lg-8">
                    <div class="blog-details-inner">
                        <!--<div class="thumb pb-4">
                            <img src="static/picture/single.png" alt="img">
                        </div> -->
                        <span class="cat">
                            <span id="date" class="date">
                                <i  class="ri-calendar-todo-fill"></i>July 14, 2021
                            </span>
                            <a id="address" href="#" class="tag me-0">
                                <i  class="ri-price-tag-3-fill"></i>Burgar
                            </a>
                        </span>
                        <div id="details" class="row justify-content-center">
                            <div class="col-lg-12">
                                <div class="single-item-wrap style-2">
                                    <div class="media">
                                        <div class="thumb">
                                            <img src="static/picture/16.png" alt="img">
                                        </div>
                                        <div class="wrap-details">
                                            <h5><a href="single-product.html">All Season Gulliver Pizza</a></h5>
                                            <p>Pizza is a savory dish of Italian origin consisting of a usually round, flattened base of leavened.</p>
                                            <div class="wrap-footer">
                                                <h6 class="price">$17.00</h6>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <!--<h3>Greek yogurt breakfast bowls with toppings</h3>
                        <p> Pizza, dish of Italian origin consisting of a flattened disk of bread dough topped with some combination of olive oil, oregano, tomato, olives, mozzarella or other cheese, and many other ingredients, baked quickly—usually, in a commercial setting, using a wood-fired oven heated to a very high temperature—and served hot 

                            It with just a touch of sauce. saucy riff, more in the style of takeout American Chinese kung pao. The sauce makes it perfect for eating with rice. lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. </p>
                        <p class="pb-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. </p>-->
                        <!--插入图片-->
                        <!--<div class="row">
                            <div class="col-6">
                                <div class="thumb mb-0">
                                    <img class="w-100" src="static/picture/single-2.png" alt="img">
                                </div>
                            </div>
                            <div class="col-6">
                                <div class="thumb mb-0">
                                    <img class="w-100" src="static/picture/single-3.png" alt="img">
                                </div>
                            </div>
                        </div>-->
<!--
                        <p class="pt-4">One of the simplest and most traditional pizzas is the Margherita, which is topped with tomatoes or tomato sauce, mozzarella, and basil. Popular legend relates that it was named for Queen Margherita, wife of Umberto I, who was said to have liked its mild fresh flavour and to have also noted that its topping colours—green, white, and red—were those of the Italian flag.</p>
-->
                    </div>

                    <!--<div class="tag-share-area">
                        <div class="row">
                            <div class="col-sm-6 align-self-center">
                                <div class="tag-inner">
                                    <span>Tags: </span>
                                    <a href="#">Fresh Food, </a>
                                    <a href="#">Spicy, </a>
                                    <a href="#">Delicious</a>
                                </div>
                            </div>
                            <div class="col-sm-6 mt-3 mt-sm-0 align-items-center">
                                <ul class="social-area text-sm-end mt-md-0 mt-2">
                                    <li><a href="#"><i class="fab fa-facebook-f"></i></a></li> 
                                    <li><a href="#"><i class="fab fa-twitter"></i></a></li> 
                                    <li><a href="#"><i class="fab fa-behance"></i></a></li> 
                                    <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li> 
                                    <li><a href="#"><i class="fab fa-google-plus-g"></i></a></li> 
                                </ul>
                            </div>
                        </div>
                    </div>-->
                    <!--<div class="comment-area">
                        <h5 class="title">03 Comments</h5>
                        <div class="media">
                            <div class="media-left">
                                <img src="static/picture/comment.png" alt="img">
                            </div>
                            <div class="media-body">
                                <a class="btn btn-base float-end" href="#">Reply</a>
                                <h6>Haslida heris</h6>
                                <span>20 Feb 2020 at 4:00 pm</span>
                                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.</p>
                            </div>
                        </div>
                    </div>
                    <form class="default-form-wrap">
                        <h5 class="title">Comments</h5>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="single-input-wrap">
                                    <input type="text" class="form-control" placeholder="Your Name">
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="single-input-wrap">
                                    <input type="text" class="form-control" placeholder="Your Email">
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="single-textarea-wrap">
                                    <textarea rows="4" placeholder="Message..."></textarea>
                                </div>
                            </div>
                        </div>
                        <button type="submit" class="btn btn-base">Submit your Message</button>
                    </form>
                </div>
                <div class="col-lg-4">
                    <div class="sidebar-area">
                        &lt;!&ndash;<div class="widget widget_search">
                            <form class="search-form">
                                <div class="form-group">
                                    <input type="text" placeholder="Search your itmes">
                                </div>
                                <button class="submit-btn" type="submit"><i class="ri-search-line"></i></button>
                            </form>
                        </div>&ndash;&gt;
                        <div class="widget widget-recent-post">
                            <h4 class="widget-title">Recent Post</h4>
                            <ul>
                                <li>
                                    <div class="media">
                                        <div class="media-left">
                                            <img src="static/picture/13.png" alt="widget">
                                        </div>
                                        <div class="media-body">
                                            <h6 class="title"><a href="#">Greek yogurt breakfast bowls with toppings</a></h6>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="media">
                                        <div class="media-left">
                                            <img src="static/picture/23.png" alt="widget">
                                        </div>
                                        <div class="media-body">
                                            <h6 class="title"><a href="#">Broad, garlic & mozzarella cheese bruschetta
                                            </a></h6>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="media">
                                        <div class="media-left">
                                            <img src="static/picture/33.png" alt="widget">
                                        </div>
                                        <div class="media-body">
                                            <h6 class="title"><a href="#">Make authentic Italian margherita pizza at home
                                            </a></h6>
                                        </div>
                                    </div>
                                </li>
                                <li>
                                    <div class="media">
                                        <div class="media-left">
                                            <img src="static/picture/43.png" alt="widget">
                                        </div>
                                        <div class="media-body">
                                            <h6 class="title"><a href="#">BBQ Chicken Classic Pizza Large</a></h6>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>-->
                        <!--<div class="widget widget-newsletter">
                            <h4 class="widget-title">Newsletter</h4>
                            <p>Subscribe to get the latest news, update and offer information. Don't worry, we won't send spam!</p>
                            <form class="newsletter-form">
                                <div class="form-group">
                                    <input type="email" placeholder="Enter e-mail">
                                </div>
                                <button class="submit-btn" type="submit"><i class="ri-arrow-right-line"></i></button>
                            </form>
                        </div>-->
                        <!--<div class="widget widget_categories">
                            <h4 class="widget-title">Categories</h4>
                            <ul>
                                <li><a href="#">Inspiration <span>(5)</span></a></li>
                                <li><a href="#">Recipes <span>(9)</span> </a></li>
                                <li><a href="#">Others <span>(18)</span></a></li>
                            </ul>
                        </div>-->
                    </div>
                </div>


            </div>
        </div>

        <div id="check" class="col-lg-3 pd-top-120 pd-bottom-90 "style="margin-left: 380px;margin-right: -635px">
            <div  class="order-cart-area">
                <div class="order-cart">
                    <h5>订单状态</h5>
                    <h6>总价:$15</h6>
                    <ul>
                        <li>付款情况 : <span>已付款</span></li>
                        <li class="total">收货情况 : <span>已收货</span></li>
                    </ul>
                </div>
                <a class="btn btn-secondary w-100" href="#"> 点击付款</a>
                <a class="btn btn-base w-100" href="#"> 确认收货</a>
            </div>
        </div>

    </div>
    <!-- blog single end -->

    <!-- footer area start -->
    <div id="footer"></div>
    <!-- footer area end -->    

    <!-- back-to-top end -->
    <div class="back-to-top">
        <span class="back-top"><i class="fas fa-angle-double-up"></i></span>
    </div>

    

    <!-- all plugins here -->

    <script src="static/js/jquery-ui.min.js"></script>
    <script src="static/js/bootstrap.min.js"></script>
    <script src="static/js/imageloded.min.js"></script>
    <script src="static/js/counterup.js"></script>
    <script src="static/js/waypoint.js"></script>
    <script src="static/js/magnific.min.js"></script>
    <script src="static/js/isotope.pkgd.min.js"></script>
    <script src="static/js/nice-select.min.js"></script>
    <script src="static/js/fontawesome.min.js"></script>
    <script src="static/js/owl.min.js"></script>
    <script src="static/js/slick-slider.min.js"></script>
    <script src="static/js/wow.min.js"></script>
    <script src="static/js/tweenmax.min.js"></script>
    <!-- main js  -->
    <script src="static/js/main.js"></script>
    <script type="text/javascript" src="static/js/include.js"></script>
</body>
</html>